import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '@/views/login.vue'
import register from '@/views/register.vue'
import samplelist from '@/views/samplelist.vue'
import addsample from '@/views/addsample.vue'
import batchimport from '@/views/batchimport.vue'
import exportdata from '@/views/exportdata.vue'
import operationrecords from '@/views/operationrecords.vue'
import ForgotPassword from '@/views/ForgotPassword.vue'
import ReagentManagement from '@/views/ReagentManagement.vue'

Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'login',
    component: login,
    meta: {
      title: '登录',
      noAuth: true // 标记不需要认证的路由
    }
  },
  {
    path: '/register',
    name: 'register',
    component: register
  },
  {
    path: '/Userhome',
    name: 'Userhome',
    component: () => import('@/views/Userhome.vue')
  },
  {
    path: '/samplelist',
    component: samplelist
  },
  {
    path: '/addsample',
    component: addsample
  },
  {
    path: '/batchimport',
    component: batchimport
  },
  {
    path: '/exportdata',
    component: exportdata
  },
  {
    path: '/operationrecords',
    component: operationrecords
  },
  {
    path: '/ForgotPassword',
    component: ForgotPassword
  },
  {
    path: '/ReagentManagement',
    component: ReagentManagement
  }

]

const router = new VueRouter({
  routes
})

export default router
